Matthias Clasen [Wed, 15 Nov 2017 00:47:04 +0000 (19:47 -0500)]
filechooserbutton: icon size is always 16
So define it that way.
Benjamin Otte [Mon, 23 Jan 2017 18:59:27 +0000 (19:59 +0100)]
cellrendererspinner: Don't track old icon size
It was only used to avoid gtk_icon_size_lookup() calls and those aren't
expensive.
Matthias Clasen [Wed, 15 Nov 2017 00:43:13 +0000 (19:43 -0500)]
image: Remove icon-size argument from icon setters
Instead, add a function gtk_image_set_icon_size() for the cases where
overriding the icon size is necessary.
Treat icon sizes the same way as pixel sizes, too. So gtk_image_clear()
no longer unsets the icon size.
Benjamin Otte [Sun, 22 Jan 2017 21:58:45 +0000 (22:58 +0100)]
image: Change getters
Instead of returning the icon size with them, make
gtk_image_get_icon_name() and gtk_image_get_gicon() only return the icon
itself.
As a benefit, we can turn them into regular getters that return values
instead of requiring out parameters.
Instead, provide gtk_image_get_icon_size() to query the icon size.
Benjamin Otte [Fri, 20 Jan 2017 07:02:48 +0000 (08:02 +0100)]
button: Get rid of icon size
In fact, make gtk_button_new_from_icon_name() just set the icon-name
property instead of creating a GtkImage.
Benjamin Otte [Fri, 20 Jan 2017 06:49:11 +0000 (07:49 +0100)]
scalebutton: Remove icon size
Benjamin Otte [Fri, 20 Jan 2017 02:16:39 +0000 (03:16 +0100)]
toolbar: Remove icon sizes
Benjamin Otte [Fri, 20 Jan 2017 01:02:44 +0000 (02:02 +0100)]
tooltips: Remove GtkIconSize usage
Benjamin Otte [Fri, 20 Jan 2017 00:50:50 +0000 (01:50 +0100)]
css: Add -gtk-icon-size
This will replace GtkIconSize in future patches.
Benjamin Otte [Wed, 15 Nov 2017 18:33:26 +0000 (19:33 +0100)]
introspection: Fix build
Benjamin Otte [Wed, 15 Nov 2017 18:05:48 +0000 (19:05 +0100)]
wayland: Fix initial cursor
Make sure the initial cursor isn't random which would happen due to an
early exit when cursor == pointer->cursor triggered because both were
NULL.
Benjamin Otte [Wed, 15 Nov 2017 17:13:31 +0000 (18:13 +0100)]
gdk: Replace GDK_NONE with NULL
Benjamin Otte [Wed, 15 Nov 2017 15:57:33 +0000 (16:57 +0100)]
gdk: Turn GdkAtom into a const char *
Instead of an integer, it is now a char pointer. We also use
g_intern_string() instead of doing the interning ourselves.
Benjamin Otte [Wed, 15 Nov 2017 15:45:12 +0000 (16:45 +0100)]
gdk: Make GDK_NONE Atom translate to NULL
Instead of the string "NONE" we now use NULL.
Benjamin Otte [Wed, 15 Nov 2017 03:42:10 +0000 (04:42 +0100)]
gdk: Get rid of magic special atoms
Benjamin Otte [Wed, 15 Nov 2017 03:07:11 +0000 (04:07 +0100)]
x11: Remove special casing for GdkAtoms
This is in preparation for the GdkAtom removal
Benjamin Otte [Tue, 14 Nov 2017 21:32:23 +0000 (22:32 +0100)]
dnd: Make GtkDragDest and GtkDragSource use GtkTargetList
This gets rid of GtkTargetEntry in the API and consistently uses
GtkTargetList.
Benjamin Otte [Tue, 14 Nov 2017 04:34:15 +0000 (05:34 +0100)]
clipboard: Consistently use GtkTargetList
Some code was using GtkTargetList, some used GtkTargetEntry and some
GtkTargetPair.
Benjamin Otte [Tue, 14 Nov 2017 02:56:35 +0000 (03:56 +0100)]
selection: Remove #ifdef WAYLAND
Instead, turn the functions into backend API:
gdk_broadway_display_add_selection_targets()
gdk_broadway_display_clear_selection_targets()
Remove the old per-backend functions, too.
Benjamin Otte [Fri, 20 Jan 2017 23:45:22 +0000 (00:45 +0100)]
cellrendererpixbuf: Remove stock-detail property
GTK3 didn't use that property already...
Benjamin Otte [Fri, 20 Jan 2017 01:02:32 +0000 (02:02 +0100)]
messagedialog: Remove unused header
Matthias Clasen [Tue, 14 Nov 2017 23:09:32 +0000 (18:09 -0500)]
win32: Remove all checks for GDK_WINDOW_ROOT
We are no longer creating windows of this type, so no
need to check for it.
Matthias Clasen [Tue, 14 Nov 2017 23:05:41 +0000 (18:05 -0500)]
win32: Remove all uses of get_root_window
This is following similar changes done in the x11 and
broadway backends, but it has not been built.
Some fixups may be needed.
Benjamin Otte [Mon, 13 Nov 2017 22:44:26 +0000 (23:44 +0100)]
placessiderbar: Fix sunny compilation
Make compilation not warn about unused variables when compiling with
HAVE_CLOUDPROVIDERS undefined.
Benjamin Otte [Mon, 13 Nov 2017 17:34:01 +0000 (18:34 +0100)]
widget: No need to update events
GtkWindow queues for all events anyway, so the needed ones are already
there.
Benjamin Otte [Mon, 13 Nov 2017 17:00:31 +0000 (18:00 +0100)]
gdkwindow: Remove event_mask arguments from constructors
Benjamin Otte [Mon, 13 Nov 2017 16:31:04 +0000 (17:31 +0100)]
window: Set ALL_EVENT_MASK
This is a trivial commit that does a big change: We now ignore event masks.
Further commits will clean up code, but if bisection ends up here, you
know it's because code is getting delivered events that it weren't getting
before.
Benjamin Otte [Mon, 13 Nov 2017 16:06:34 +0000 (17:06 +0100)]
gdk: Fix GDK_ALL_EVENTS_MASK
This mask was forgotten to update when the last 2 event masks were
added, probably because it looks like it's already maxed.
Benjamin Otte [Mon, 13 Nov 2017 15:51:35 +0000 (16:51 +0100)]
widget: Remove gtk_widget_set_device_enabled()
Nobody is using it.
Matthias Clasen [Mon, 13 Nov 2017 21:47:50 +0000 (16:47 -0500)]
x11: Remove mentions of GDK_WINDOW_ROOT
This backend never creates a window of this type, so no
need to check for it anymore.
Matthias Clasen [Mon, 13 Nov 2017 21:39:54 +0000 (16:39 -0500)]
x11: Stop creating a root window
We no longer need it.
Matthias Clasen [Mon, 13 Nov 2017 21:32:34 +0000 (16:32 -0500)]
x11: Store toplevel list in GdkDisplay
This will let us get rid of the root window.
Matthias Clasen [Mon, 13 Nov 2017 21:09:47 +0000 (16:09 -0500)]
x11: Remove another use of the root window
We just need the X root window here.
Matthias Clasen [Mon, 13 Nov 2017 17:12:52 +0000 (12:12 -0500)]
icontheme: Add a trailing / when enumerating resources
This avoids extra string copies in GResource.
Carlos Soriano [Mon, 30 Oct 2017 20:47:07 +0000 (21:47 +0100)]
gtkplacessidebar: Fix new tab/window handling for cloud accounts
It wasn't taking into account whether the sidebar had support for them
or not, resulting in a file chooser with open in new tab/window menu
items when it's not supported.
To fix it, do as with the other menus and check for the availability of
new tab/window flags.
https://bugzilla.gnome.org/show_bug.cgi?id=786123
Carlos Soriano [Mon, 30 Oct 2017 20:38:41 +0000 (21:38 +0100)]
gtkplacessidebar: Adapt to libcloudproviders 0.2.x
And a few improvements on the way.
https://bugzilla.gnome.org/show_bug.cgi?id=786123
Matthias Clasen [Mon, 13 Nov 2017 12:35:18 +0000 (07:35 -0500)]
application: Append a / to the icon resource path
g_resources_enumerate_children expects the path to end
in a '/' (even though thats not stated in the docs), and
will copy it if that isn't the case. Avoid the copy
by putting a '/' there to begin with.
Matthias Clasen [Mon, 13 Nov 2017 12:33:35 +0000 (07:33 -0500)]
icontheme: Append a / to the resource path
g_resources_enumerate_children expects the path to end
in a '/' (even though thats not stated in the docs), and
will copy it if that isn't the case. Avoid the copy
by putting a '/' there to begin with.
Benjamin Otte [Mon, 13 Nov 2017 02:51:53 +0000 (03:51 +0100)]
a11y: Handle a treeview with no columns
Code was spewing criticals to stderr because of nonexisting columns. So
check that there's actually an existing column first.
Benjamin Otte [Mon, 13 Nov 2017 00:53:45 +0000 (01:53 +0100)]
treeview: Only update vadjustment in size_allocate()
The 2 calls even do different things, but because the one in allocate
always overrides the one here...
Benjamin Otte [Mon, 13 Nov 2017 00:23:16 +0000 (01:23 +0100)]
treeview: Pass height to allocate as argument
Instead of exporting a function to query it.
Benjamin Otte [Sun, 12 Nov 2017 05:19:00 +0000 (06:19 +0100)]
progresstracker: Don't hand out NaN
When the duration is set to 0, clamp it to 1us. This way we're almost
correct: We should really instantly finish, but we don't. But we do
respect the delay.
Doing this properly would require some refactoring of how the progress
tracker actually maintains progress, and this is just a quick fix.
Benjamin Otte [Sun, 12 Nov 2017 04:46:06 +0000 (05:46 +0100)]
treeview: Use gtk_widget_get_width()
... instead of gtk_widget_get_allocated_width() and same for height.
This makes the treeview do the right thing when used with padding.
Benjamin Otte [Sun, 12 Nov 2017 04:38:58 +0000 (05:38 +0100)]
treeview: Don't allocate columns outside of size_allocate()
Benjamin Otte [Sun, 12 Nov 2017 04:37:06 +0000 (05:37 +0100)]
treeview: Fix RTL column header allocation
Benjamin Otte [Sun, 12 Nov 2017 03:55:17 +0000 (04:55 +0100)]
treeview: width_changed is always true, so remove it
Also, sanitize the RTL correction code that made sure resizing the width
of a treeview would keep the contents glued to the right border instead
of the left border.
Matthias Clasen [Sat, 11 Nov 2017 17:07:11 +0000 (12:07 -0500)]
x11: Fix a crash
This was crashing the moment a second window is opened.
Matthias Clasen [Sat, 11 Nov 2017 12:46:59 +0000 (07:46 -0500)]
Fix up managed dnd
Since commit
6c56d04cee23d3340cf7cf08756c610efe9ccdab,
we were doing some calls twice in the managed dnd case,
leading to double drops.
Benjamin Otte [Sat, 11 Nov 2017 04:37:37 +0000 (05:37 +0100)]
textview: Remove GDK windows
Benjamin Otte [Sat, 11 Nov 2017 04:22:17 +0000 (05:22 +0100)]
textview: Simplify gtk_text_view_buffer_to_window_coords()
... and gtk_text_view_window_to_buffer_coords()
Benjamin Otte [Sat, 11 Nov 2017 04:12:07 +0000 (05:12 +0100)]
textview: Use text_window_get_width()/height()
Instead of poking the GdkWindow. They have the same size after all.
Benjamin Otte [Sat, 11 Nov 2017 04:01:31 +0000 (05:01 +0100)]
textview: Make the semi-private headrs really private
Rename the files to have the private.h ending.
And remove gtktextdisplay.h from the installed files.
Benjamin Otte [Sat, 11 Nov 2017 03:30:00 +0000 (04:30 +0100)]
textview: Store border window sizes in a custom struct
That way, we don't need to have a GtKRequisition in every TextWindow.
Benjamin Otte [Sat, 11 Nov 2017 03:01:55 +0000 (04:01 +0100)]
gtktexttag: Remove GtkTextTag::event and gtk_text_tag_event()
GtkSourceView is not using it, so it's unneeded. And it's certainly
diving deep into event internals of GtkTextView which hinders a proper
gesturization.
Benjamin Otte [Sat, 11 Nov 2017 01:47:59 +0000 (02:47 +0100)]
textview: Hide the selection bubble better
The selection bubble is not part of the text windows, so hiding it
during scroll should not be done in the text window code.
Also remove an unused variable that was only set in that code but never
read.
Benjamin Otte [Fri, 10 Nov 2017 14:33:24 +0000 (15:33 +0100)]
flowbox: Compute view box from correct variables
Matthias Clasen [Fri, 10 Nov 2017 21:14:19 +0000 (16:14 -0500)]
Drop the last use of GDK_MULTIHEAD_SAFE
This define is not used anymore, this was a leftover.
Kjell Ahlstedt [Fri, 10 Nov 2017 15:48:30 +0000 (16:48 +0100)]
GtkCssImageIconTheme: Don't try to unref a NULL pointer
In gtk_css_image_icon_theme_snapshot(), don't try to unref icon_info
if it's NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=790171
Benjamin Otte [Fri, 10 Nov 2017 14:04:13 +0000 (15:04 +0100)]
rendericon: Add missing include
Benjamin Otte [Fri, 10 Nov 2017 13:53:36 +0000 (14:53 +0100)]
stylecontext: Make first property name explicit
Insist that a first non-NULL property is passed to
gtk_style_context_get().
This is in particular relevant because of dropping the state argument
since GTK3, and code like
gtk_style_context_get (context, state, "font", &font);
would keep compiling without warnings without this change.
Benjamin Otte [Fri, 10 Nov 2017 13:34:42 +0000 (14:34 +0100)]
a11y: Report correct spinner size
Benjamin Otte [Fri, 10 Nov 2017 13:34:12 +0000 (14:34 +0100)]
calendar: Fix for GTK4 changes
Benjamin Otte [Wed, 8 Nov 2017 15:09:17 +0000 (16:09 +0100)]
testgtk: Draw the right area in alpha window test
Even broken stuff is easier now.
Benjamin Otte [Wed, 8 Nov 2017 15:05:52 +0000 (16:05 +0100)]
examples: Use right function to query size
Benjamin Otte [Wed, 8 Nov 2017 15:05:33 +0000 (16:05 +0100)]
testgtk: Fix some more old drawing area uses
Benjamin Otte [Wed, 8 Nov 2017 14:49:52 +0000 (15:49 +0100)]
tests: After 20 years, update the simple test to modern GTK
It's 3 lines shorter!
And it works again!
Benjamin Otte [Wed, 8 Nov 2017 14:27:21 +0000 (15:27 +0100)]
testgtk: Fix rotated text demo
Use proper DrawingArea APIs here.
Matthias Clasen [Thu, 9 Nov 2017 23:40:16 +0000 (18:40 -0500)]
x11: Reduce uses of the root window
Avoid calling the get_root_window api that returns
a GdkWindow in some places, and instead use the X
root window directly.
Matthias Clasen [Thu, 9 Nov 2017 03:21:42 +0000 (22:21 -0500)]
Simplify the gtk_snapshot_icon_texture API
Instead of passing the color matrix in from the outside,
just pass a boolean and set up the matrix internally.
Matthias Clasen [Thu, 9 Nov 2017 03:09:34 +0000 (22:09 -0500)]
Fix a compiler warning
Matthias Clasen [Thu, 9 Nov 2017 03:09:23 +0000 (22:09 -0500)]
Fix a typo
Matthias Clasen [Thu, 9 Nov 2017 02:55:34 +0000 (21:55 -0500)]
filesystem: Drop surface-based APIs
These are no longer used.
Matthias Clasen [Thu, 9 Nov 2017 02:52:50 +0000 (21:52 -0500)]
filechooserwidget: Use GIcons
This lets us avoid much of the symbolic icon rendering api.
Matthias Clasen [Thu, 9 Nov 2017 01:54:48 +0000 (20:54 -0500)]
filechooserbutton: Use GIcons
This lets use avoid much of the symbolic icon rendering api.
Matthias Clasen [Thu, 9 Nov 2017 01:53:49 +0000 (20:53 -0500)]
filesystem: Add GIcon getters
We want to move away from surfaces, and instead pass
GIcons and GdkTextures around.
Chun-wei Fan [Tue, 7 Nov 2017 07:39:48 +0000 (15:39 +0800)]
Win32: Re-work cursor handling
Like the X11 and Wayland backends, re-work how the cursors are being
handled. So, we use a hash table to cache up the HCURSORS that we
create along the way.
We still need to cache up the icon/cursor themes since this is something
that is not part of Windows but was added on to support icon/cursor themes
such as Adwaita on Windows, but should be in-line with what is going on in
GdkCursor.
Also, remove the _gdk_grab_cursor global variable in gdkprivate-win32.h,
and replace it with another variable in the GdkWin32Display structure,
to make things cleaner in the process.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
Matthias Clasen [Wed, 8 Nov 2017 15:04:38 +0000 (10:04 -0500)]
Use color matrices for -gtk-recolor
Use the same approach we take for recoloring in GtkIconHelper now.
As part of this change, GtkCsSImageRecolor is changed to not derive
from GtkCssImageUrl anymore.
Daniel Boles [Wed, 8 Nov 2017 06:51:32 +0000 (06:51 +0000)]
CssProvider: Fix doc of min theme version loaded
The code shows that we only load back to 4.0, but this still said 3.0.
Daniel Boles [Wed, 8 Nov 2017 06:48:17 +0000 (06:48 +0000)]
CssProvider: Use consistent theme name placeholder
commit
475d916eb92c0106d09525bcca938f05fd6a81b5 added various paths that
use theme-name for this, but the existing path already used THEME, with
a subsequent description referring to the latter. So use that everywhere
Matthias Clasen [Wed, 8 Nov 2017 05:37:04 +0000 (00:37 -0500)]
Fix the build
Matthias Clasen [Wed, 8 Nov 2017 04:04:36 +0000 (23:04 -0500)]
css image: Use GdkTexture api directly
No need to load a pixbuf anymore, we can just
directly create textures.
Matthias Clasen [Wed, 8 Nov 2017 02:39:47 +0000 (21:39 -0500)]
css: Use a color matrix for recoloring -gtk-icontheme
This is the same approach we are already using in
GtkIconHelper.
Matthias Clasen [Wed, 8 Nov 2017 02:27:38 +0000 (21:27 -0500)]
Make the recoloring code more robust
Pass both width+height and scale, so we can handle the case
where width+height are zero and we are using the file, scaled.
Matthias Clasen [Wed, 8 Nov 2017 00:56:11 +0000 (19:56 -0500)]
fix the build
Matthias Clasen [Tue, 7 Nov 2017 23:55:01 +0000 (18:55 -0500)]
Fix symbolic.svg rendering
With the shader approach to symbolic recoloring, we must
not recolor the svgs anymore as we're loading them. Instead,
load them the same way that gtk-encode-symbolic-svg does.
This fixes the rendering of large symbolic icons e.g. the
'no search results found' page in the file chooser.
Matthias Clasen [Tue, 7 Nov 2017 12:43:09 +0000 (07:43 -0500)]
wayland: Drop an unused function
We no longer create a root window, so need to have
a function for it.
Benjamin Otte [Tue, 7 Nov 2017 11:22:48 +0000 (12:22 +0100)]
x11: Correctly set icons
X11 obviously doesn't use 4 bytes for a 4 bytes pixel. Rather, it uses
unsigned long, which happens to be 8 bytes these days.
Matthias Clasen [Tue, 7 Nov 2017 02:11:16 +0000 (21:11 -0500)]
broadway: Drop the root window
We already have a list of toplevels, so we don't
need the root window for this.
Matthias Clasen [Mon, 6 Nov 2017 23:30:27 +0000 (18:30 -0500)]
wayland: Drop the root window
We can just keep a list of toplevels in the display.
Marek Cernocky [Mon, 6 Nov 2017 20:04:50 +0000 (21:04 +0100)]
Updated Czech translation
Matthias Clasen [Mon, 6 Nov 2017 02:45:14 +0000 (21:45 -0500)]
Drop gdk_display_get_root_window
This is no longer used.
Matthias Clasen [Mon, 6 Nov 2017 02:25:42 +0000 (21:25 -0500)]
x11: Stop using gdk_display_get_root_window
Use the backend api for this.
Matthias Clasen [Mon, 6 Nov 2017 02:05:25 +0000 (21:05 -0500)]
x11: Make gdk_x11_display_get_root_window available
This will replace the frontend api of the same name.
Matthias Clasen [Mon, 6 Nov 2017 02:00:04 +0000 (21:00 -0500)]
win32: Stop using gdk_display_get_root_window
Use the newly introduced backend api for this purpose.
Matthias Clasen [Mon, 6 Nov 2017 01:45:49 +0000 (20:45 -0500)]
win32: Make gdk_win32_display_get_root_window available
This will be used to replace the equivalent frontend api,
which is going away.
Benjamin Otte [Mon, 6 Nov 2017 02:24:34 +0000 (03:24 +0100)]
widget: Don't leak the cursor on destruction
Matthias Clasen [Mon, 6 Nov 2017 00:44:39 +0000 (19:44 -0500)]
wayland: Stop using gdk_display_get_root_window
We can just use the display field directly.
Matthias Clasen [Mon, 6 Nov 2017 00:43:39 +0000 (19:43 -0500)]
Typo fix
Matthias Clasen [Mon, 6 Nov 2017 00:37:54 +0000 (19:37 -0500)]
broadway: Stop using gdk_display_get_root_window
We can just use the field in the display.
Matthias Clasen [Mon, 6 Nov 2017 00:30:54 +0000 (19:30 -0500)]
Stop using the root window in gdk_window_create_similar_image_surface
Just create a plain image surface if we don't get a window.
This should work just fine and lets us drop another implicit
use of the root window.